/**
 * 业务步骤配置管理
 */
import request from '@/utils/request';

//查询业务步骤
export function query(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/admin/modules/business/businessProcess/query',
		method: 'post',
		data: data,
	});
}

//新增或修改业务步骤
export function add(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/admin/modules/business/businessProcess/add',
		method: 'post',
		data: data,
	});
}

//新增或修改业务步骤
export function edit(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/admin/modules/business/businessProcess/edit',
		method: 'put',
		data: data,
	});
}

//确认业务步骤
export function confirm(ids: any): ApiPromise<ApiResponse> {
	return request({
		url: '/admin/modules/business/businessProcess/confirm/' + ids,
		method: 'put',
		data: ids,
	});
}

//确认业务步骤
export function cancel(ids: any): ApiPromise<ApiResponse> {
	return request({
		url: '/admin/modules/business/businessProcess/cancel/' + ids,
		method: 'put',
		data: ids,
	});
}

//删除业务步骤
export function remove(ids: any): ApiPromise<ApiResponse> {
	return request({
		url: '/admin/modules/business/businessProcess/delete/' + ids,
		method: 'delete',
	});
}

//获取专属指标
export function getIndicator(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/admin/modules/business/businessProcess/queryIndicator',
		method: 'post',
		data: data,
	});
}

//获取配置组合策略
export function getStrategy(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/admin/modules/business/businessProcess/getStrategy',
		method: 'post',
		data: data,
	});
}

//保存配置组合策略
export function saveStrategy(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/admin/modules/business/businessProcess/saveStrategy',
		method: 'post',
		data: data,
	});
}

//查询相同系统下共用步骤的业务
export function queryBusiness(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/admin/modules/business/businessProcess/queryBusiness',
		method: 'post',
		data: data,
	});
}
